<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/plugin/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>
</head>
<body>
<div class="ibox-content">
		<form class="form-horizontal" id="dataform" onsubmit="javascripr:return false;">
			<input type="hidden" name="tokenUrl" value="${tokenUrl}">	 
			<input type="hidden" name="token" value="${token}">
		<c:if test="${obj ne null }">
			<input type="hidden" name="nsyId" value="${obj.nsyId }">
		</c:if>
		<div class="form-group">
			<label class="col-sm-2 control-label">用户名称
			<span class="text-danger">*</span>
			</label>
			<div class="col-sm-4">
				<input type="text" class="form-control" name="nsyName" 
						maxLength="200" dataType="s1-200"
					value="<c:out value="${obj.nsyName }"></c:out>" nullmsg="用户名称不能为空">
			</div>
			<label class="col-sm-2 control-label">单位
			<span class="text-danger">*</span>
			</label>
			<div class="col-sm-4">
				<input type="text" class="form-control" name="nsyUnit" 
						maxLength="500" dataType="s1-500"
					value="<c:out value="${obj.nsyUnit }"></c:out>" nullmsg="单位不能为空">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">性别
			<span class="text-danger">*</span>
			</label>
			<div class="col-sm-4">
				<select class="form-control"  name="nsySex">
					<option value="1"
							<c:if test="${obj.nsySex eq '1' }">selected="selected"</c:if>>男</option>
					<option value="2"
							<c:if test="${obj.nsySex eq '2' }">selected="selected"</c:if>>女</option>
				</select>
			</div>
			<label class="col-sm-2 control-label">身份证号码
			<span class="text-danger">*</span>
			</label>
			<div class="col-sm-4">
				<input type="text" class="form-control" name="nsyCard" 
						maxLength="20" dataType="s1-20"
					value="<c:out value="${obj.nsyCard }"></c:out>" nullmsg="身份证号码不能为空">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">管理体系类别
			<span class="text-danger">*</span>
			</label>
			<div class="col-sm-4">
				<input type="text" class="form-control" name="nsyType" 
						maxLength="200" dataType="s1-200"
					value="<c:out value="${obj.nsyType }"></c:out>" nullmsg="管理体系类别不能为空">
			</div>
			<label class="col-sm-2 control-label">证书编号
			<span class="text-danger">*</span>
			</label>
			<div class="col-sm-4">
				<input type="text" class="form-control" name="nsyNumber" 
						maxLength="200" dataType="s1-200"
					value="<c:out value="${obj.nsyNumber }"></c:out>" nullmsg="证书编号不能为空">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">发证日期
			<span class="text-danger">*</span>
			</label>
			<div class="col-sm-4">
				<input type="text" class="form-control datetimepicker" name="nsyApplyDate"
					   ignore="ignore"
					   value='<fmt:formatDate pattern="yyyy-MM-dd" value="${obj.nsyApplyDate}" ></fmt:formatDate>' nullmsg="发证日期不能为空">
			</div>
			<label class="col-sm-2 control-label">有效日期
			<span class="text-danger">*</span>
			</label>
			<div class="col-sm-4">
				<input type="text" class="form-control datetimepicker" name="nsyExpireDate"
					   value='<fmt:formatDate pattern="yyyy-MM-dd" value="${obj.nsyExpireDate}" ></fmt:formatDate>' nullmsg="有效日期不能为空">
			</div>
		</div>
		<div class="form-group ">
			<div class="col-sm-12 text-center">
				<a href="javascript:;" onclick="myForm.submit()"
					class="btn btn-success radius"><i class="fa fa-check"></i>  保存</a>&nbsp;&nbsp;&nbsp;&nbsp; <a
					 class="btn btn-danger radius" href="javascript:;" onclick="MTools.closeForm()" ><i class="fa fa-close"></i> 关闭</a>
			</div>
		</div>
	</form>
	</div>
</body>
<script type="text/javascript" src="${path }/resource/js/systools/MJsBase.js"></script>
<script type="text/javascript">
	$(function() {
		var _initParam = {
			format : 'yyyy-mm-dd',
			todayBtn : true,
			autoclose : true,
			startView : 3,
			maxView : 2,
			minView : 'month'
		};
		MTools.ininDatetimepicker(_initParam);
	})

	MTools.autoFullSelect();
	$(".select2").select2();
	var invokeUrl="${path}/do/admin/bizNsy/addBizNsy";
	<c:if test="${obj ne null }">
	invokeUrl = "${path}/do/admin/bizNsy/modifyBizNsy";
	</c:if>
	var myForm=MForm.initForm({
		invokeUrl:invokeUrl,
		afterSubmit:function(){
			parent.myGrid.serchData();
		},
	});
</script>
</body>
</html>